<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link href="css/jqueryui.css" rel="stylesheet" type="text/css"/>
<script src="js/jquery.js"></script>
<script src="js/jqueryuiF.js"></script>
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
#shelf{position:fixed; top:10px; left:500px; height:100px;width:200px;background:white;opacity:0.7;}
#draggable {width: 30px; height: 30px;}
</style>
<script type="text/javascript">
$(function() {
	$( "#draggable" ).draggable({helper:"clone",
		stop: function(e) {
			//alert(e.pageX);
			//alert(e.pageY);
			//$(this).hide();
			 var point=new google.maps.Point(e.originalEvent.pageX,e.originalEvent.clientY);
		     var proj = overlay.getProjection();
		     var ll = proj.fromContainerPixelToLatLng(point);
		    var marker = new google.maps.Marker({
	    	    position: ll,
	    	    title:"Hello World!",
	    	    map:map,
	    	    icon:"a.png"
	    	});
		}});
});
</script>


<script type="text/javascript"
    src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCzP_5nRPH-23UjClb65zSrCqDPKkJnsdE&sensor=false">
</script>



<script type="text/javascript">
var map;
var latlng;
var overlay;


function Dummy(map) {
    this.setMap(map);
}
Dummy.prototype = new google.maps.OverlayView();
Dummy.prototype.draw = function() {
    if (!this.ready) { 
        this.ready = true; 
        google.maps.event.trigger(this, 'ready'); 
    } 
}
Dummy.prototype.onAdd = function(){
    // the Overlay dummy is ready and can be called upon
    delayedInit();
}
var dum;

  function initialize() {
	  latlng = new google.maps.LatLng(-34.397, 150.644);
    var myOptions = {
      zoom: 8,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
     map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);

     overlay = new Dummy(map);


	
  }

</script>

</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
<div id='shelf'>Drag the image<br/><img id="draggable" src='a.png'/></div>
</body>
</html>